<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/decorators/taglibs.jsp"%>
<style>
.title {
	font-size: 20px;
	margin: 15px 15px 15px 15px;
}

img {
	vertical-align: text-bottom;
	height: 30px;
	width: 30px;
}

a {
	color: #0000CC;
}

a:hover {
	color: red;
}

#css_table {
	display: table;
}

.css_tr {
	display: table-row;
}

.css_td {
	display: table-cell;
	width: 400px;
	height: 40px;
}
</style>
<div class="w1a" style="height: 600px">
	<div>
		<h2>影像檔案</h2>
	</div>
	<div class="title">會期：第${motion.session.sessionNo}期</div>
	<div class="title">案別：${motion.type}${motion.motionOrder}</div>
	<div class="title">提案單位：${motion.unitName}</div>
	<div class="title">案由：${motion.cause}</div>
	<div class="title">
		檔案類型：
		<c:choose>
			<c:when test="${type eq 'pdf'}">
				<img src="${appPath}/themes/icons/pdf_2.png"
					style="vertical-align: text-top; height: 70px; width: 70px;" />
			</c:when>
			<c:otherwise>
				<img src="${appPath}/themes/icons/tif.png"
					style="vertical-align: text-top; height: 70px; width: 70px;" />
			</c:otherwise>
		</c:choose>
	</div>
	<div></div>
	<hr />
	<div id="css_table">
		<c:forEach var="file" varStatus="status" items="${fileMap}">
		<c:if test="${status.count%3 ==1}">
			<div class="css_tr">
		</c:if>
			<div class="css_td">
				<a href="javascript:download('${file.key}');"><img
					src="${appPath}/themes/icons/box_download.png" />${file.value}</a>
			</div>
		<c:if test="${status.count%3 ==0}">
			</div>
		</c:if>
	</c:forEach>
	</div>

<form name="fileForm" id="fileForm" method="post"
	action="${appPath}/files/exp.htm">
	<input type="hidden" name="sessionNo" id="sessionNo"
		value="${motion.session.sessionNo}" /> <input type="hidden"
		name="filename" id="filename" />
</form>
</div>
<script type="text/javascript">
	function download(fileName) {
		$("#filename").val(fileName);
		$("#fileForm").submit();
	}
</script>